﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ScheduleMaker.DB.Domain.Core;

namespace ScheduleMaker.DB.Domain
{
    public class LevelSchool : Level
    {
        private int id;
        private string name;
        private IList<User> users;

        public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }

        public virtual string Name
        {
            get { return name; }
            set { name = value; }
        }

        public virtual IList<User> Users
        {
            get { return users; }
            set { users = value; }
        }

        public override bool Equals(object obj)
        {
            if (obj == null)
                return false;
            var t = obj as LevelSchool;
            if (t == null)
                return false;
            if (Id == t.Id
                && Name == t.Name)
                return true;
            return false;
        }

        public override int GetHashCode()
        {
            return (Id + "|"
                + Name).GetHashCode();
        }
    }
}
